home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Experimental BBS Explossion 3
/
Experimental BBS Explossion III.iso
/
gus
/
gusdly03.zip
/
GUSDELAY.TXT
Wrap
Text File
|
1993-09-17
|
18KB
|
318 lines
This is the documentation file for GUSDELAY.EXE version 0.3.
Copyright (c) 1993 by David MacMahon - All rights reserved
This program, GUSDELAY.EXE, may be freely distributed provided that this
documentation accompanies the program, no fee is charged for the program
(except for a NOMINAL media charge), and it is not distributed as part of
any commercial offering.
Versions 0.x are pre-release versions and are considered "freeware" (subject
to the terms in the preceding paragraph). No fee is required for using the
pre-release versions of the program. Version 1.0 and all subsequent versions
will be "shareware" (or some variation of the shareware theme).
TABLE OF CONTENTS
0. NEW FEATURES AND CHANGES
1. HOW TO USE GUSDELAY
a) Overview
b) Adding, deleting, and selecting voices
c) Changing the volume of a voice
d) Changing the delay of a voice
e) Changing the pan position (balance) of a voice
f) Saving to disk
g) Quitting GUSDELAY
2. CONTACTING THE AUTHOR
3. THINGS TO DO / CURRENT LIMITATIONS
4. INTERESTING TECH NOTES (Look here if you have problems!)
0. NEW FEATURES AND CHANGES
I have fixed the bug that caused noise in the right channel. I have added
support for more than one voice. It is now possible to adjust a voice's
volume on-the-fly. It is now possible to adjust the pan position (balance)
of a voice on-the-fly. In stereo, this controls the separation of the
voices. In mono, this controls the regeneration (echo) of the delayed
signal. (Using this technique, if you put mono in on the left channel of the
input connector and take mono out from the right channel of the output
connector, GUSDELAY turns your GUS into an ideal delay unit for musical
instruments!) I have changed the interface to accommodate all of the new
functionality. I have changed the delay to be in terms of samples instead
of "download buffers". A "download buffer" is 32 or 64 samples. Which size
it is depends on the sampling frequency. If 32 samples (per channel) are
taken in less than 1 ms then the download buffer will be 64 samples. This
means that the minimum delay is now one "download buffer" plus one sample.
The minimum delay used to be two "download buffers".
1. HOW TO USE GUSDELAY
a) Overview
The program accepts no command line arguments, so just type GUSDELAY to
start it. The program firsts asks if you want to record in stereo or mono.
Then it will ask you for a sampling frequency. If you enter a sampling
frequency that is not one of the 256 discrete sampling frequencies at which
the GUS can sample, GUSDELAY will print the actual sampling frequency that
is used. This will be a little higher than the frequency you specified.
On my 25 MHz 386 I have been able to use 11025 (Hz) without losing any
samples (that I can detect). I would be fascinated to find out how it works
on other types of machines. GUSDELAY then asks you which input source to
use (Line In, Mic In, or both). Then it starts delaying. While it is
delaying, there are several keys that you can use to change various
parameters (i.e. volume, delay, panning), add and delete voices, and turn
disk writing on and off. These keys and their effects are discussed below.
b) Adding, deleting, and selecting voices
When GUSDELAY first starts delaying, there are no "active voices". An
active voice is a voice that is playing back delayed data. This version of
GUSDELAY supports up to 14 active voices. In stereo, voices are used in
pairs so you can have up to 7 pairs of active voices. Since the each voice
has several parameters that can be independently configured, one of the
active voices is considered the "current voice". The current voice is the
active voice whose parameters can be changed. In stereo, there are two
current voices; one for the left channel and one for the right channel.
Any active voice can be the current voice. Active voices can be made
inactive. Here are the keystrokes for adding/deleting active voices and
selecting the current voice.
Insert - Activates that first inactive voice and makes it the current
voice.
Delete - De-activates the last activated voice. If this voice happens
to be the current voice, then the next-to-last activated voice
will become the new current voice.
Page Up - Cycles the current voice through all active voices in
ascending order.
Page Down - Cycles the current voice through all active voices in
descending order.
c) Changing the volume of a voice
The volume of a voice can range from 0 to 4095. This is NOT a linear scale.
You will have to play around the volume to get a feel for it. In stereo,
setting the volume too high (basically anything above 3600 with one active
voice) will cause a positive feedback effect and it will sound like
(surprise!) feedback. Adjusting the volume to just below this threshold
causes some interesting effects. This threshold value gets lower and lower
as active voices are added. In stereo, adjusting a voice's volume is the
only way to control the regenerative (echo) properties of that voice. In
mono, the regenerative properties of a voice and the positive feedback
threshold are dependent on the pan position of the voice (see below) as well
as its volume. Here are the keystrokes for changing the volume of the
current voice.
Up Arrow - Increases the volume of the current voice by 10
Down Arrow - Decreases the volume of the current voice by 10
Ctrl Up Arrow - Increases the volume of the current voice by 100
Ctrl Down Arrow - Decreases the volume of the current voice by 100
d) Changing the delay of a voice
The delay of a voice can range from a minimum of 1 sample (actually 1 sample
plus one download buffer) to a maximum of approximately 256K samples for
mono and 128K samples for stereo. GUSDELAY does not use more than 256K of
the GUS' DRAM (yet). Here are the keystrokes for changing the volume of the
current voice.
'+' - Increases the delay of the current voice by 10
'-' - Decreases the delay of the current voice by 10
'*' - Increases the delay of the current voice by 100
'/' - Decreases the delay of the current voice by 100
Right Arrow - Increases the delay of the current voice by 50
Left Arrow - Decreases the delay of the current voice by 50
Ctrl Right Arrow - Increases the delay of the current voice by 500
Ctrl Left Arrow - Decreases the delay of the current voice by 500
'0'-'9' - Sets the last digit of the current voice's delay
e) Changing the pan position (balance) of a voice
The pan position of a voice can range from 0 to 15 with 0 being all the way
to the left, 15 being all the way to the right, and 7 being centered. In
stereo, the left voice starts with a pan position of 0 and the right voice
starts with a pan position of 15. Changing the pan position of the current
(stereo) voice pair will affect the separation. After 7 changes away from
the initial pan positions, both voices will be just about dead center (no
separation). After 15 changes away from the initial pan positions, the left
voice will be all the way to the right and the right voice will be all the
way to the left. In mono, all voices start with a pan position of 15 (far
right). Since, in mono, the GUS samples only the left channel, the output
of voices with this pan position will not regenerate (echo) at all (i.e. the
voice's delayed data will be heard only once). Changing the pan position of
the current (mono) voice will also change the amount of that voice's
regeneration (echo). As mentioned above, this technique can turn your GUS
into an ideal delay unit for musical instruments. Here are the keystrokes
for changing the pan position of the current voice.
'>' - Increases the value of the pan position of the current voice by 1.
In stereo, this increases (by 1) the pan position of the left voice
of the current voice pair and decreases (by 1) the pan position of
the right voice. This has the effect of decreasing the separation
(unless the voices have "crossed", in which case the separation is
increased.) In mono, this decreases the regeneration of the current
voice.
'<' - Decreases the value of the pan position of the current voice by 1.
In stereo, this decreases (by 1) the pan position of the left voice
of the current voice pair and increases (by 1) the pan position of
the right voice. This has the effect of increasing the separation
(unless the voices have "crossed", in which case the separation is
decreased.) In mono, this increases the regeneration of the current
voice.
f) Saving to disk
When the program starts, disk writing is turned off. Turning on disk
writing on causes a file named DATAFILE.SB to be created (or overwritten) in
the current directory. Turning disk writing off acts like 'Pause'. No data
are written until disk writing is toggled back on. Data written after disk
writing is toggled back on are appended to the data already written to
DATAFILE.SB. This file contains only raw data samples. It is identical in
format to USS8's .SND files in that there is no header information, but
DATAFILE.SB contains *signed* data (USS8's .SND files contain *unsigned*
data). I chose the .SB extension to facilitate processing this file with SOX
(an excellent utility, BTW). SB stands for "Signed Bytes", and is an
extension understood by SOX to imply just that. It does not stand for "Sound
Board" and *definitely* not "Sound B*****r" :-) To create a .WAV file from
DATAFILE.SB file, use this command:
sox -r <sample_rate> -c <#_of_channels> datafile.sb <yourname>.wav
Here are the keystrokes for toggling disk writing on and off.
'd' or 'D' - Toggles disk writing on and off
g) Quitting GUSDELAY
Here are the keystrokes for quitting GUSDELAY.
'q' or 'Q' - Quits GUSDELAY
2. CONTACTING THE AUTHOR
I can be reached via e-mail at davidm@marcam.com. I am very interested in
your feedback, both good and bad, and will try to respond to all of it. I
also read the "GUS SDK Digest", the "Ultrasound Daily Digest" and the news
group comp.sys.ibm.pc.soundcard.
3. THINGS TO DO / CURRENT LIMITATIONS
Even though the current version of GUSDELAY has quite a bit of functionality,
there are more features I would like to add. Some of these offer new
functionality while others offer increased ease of use. The functionality
in the current version is close to what the shareware and crippleware
versions will offer. I plan on releasing versions 1.x as shareware. These
versions will have the same not-so-hot user interface as the current version
as well as some new functionality (see below). Versions 2.x will be released
as crippleware (i.e. after a few minutes the program introduces noice into
the output). These versions will sport a new graphical user interface (most
likely TurboVision) and offer many features that will make GUSDELAY *much*
easier and convenient to use. All registered users of any 1.x version will
automatically become registered users of all 2.x versions that are released.
Below are the feature lists for versions 1.0 and 2.0. There is also a list
of planned features that will be put into a 1.x version or a 2.x version.
Feature list for version 1.0
----------------------------
- All the functionality of version 0.3.
- Command line arguments to specify mono/stereo, sample rate, and input.
- "Negative volume" - Essentially, this will allow voices to play back
the original signal or its inverse. This will allow the GUS to act as a
recursive or non-recirsive digital filter. As of version 0.3, GUSDELAY
supported multiple voices, so recursive or non-recursive digital filters
could be implemented, but without the "negative volume" feature, all of
the filter's coefficients had to be positive.
Feature list for version 2.0
----------------------------
- All the functionality of version 1.x.
- Graphical user interface (probably TurboVision).
- Write to user-specified filenames instead of DATAFILE.SB.
- Create .WAV files instead of raw data files.
- Save and load configuration files for presetting voices.
Features for versions 1.x or 2.x
--------------------------------
- Support for more than 256K of GUS DRAM
- Flanger effect - This will fluctuate a voice's playback frequency above
and below the recording frequency.
- Tremelo effect - This will fluctuate a voice's volume.
- Adjustable maximum delay.
- Ability to change loop mode - Allow voices to loop bi-directionaly. This,
in combination with the adjustable maximum delay, can create some bizarre
effects.
- Compensation mode - This is strictly conceptual at this point, but I
envision a mode of operation that will produce sample sounds and measure
the regeneration effects at different volumes and pan positions. This
information, in conjuction with negative volume, will be used to
facilitate multiple echo elimination.
- Your excellent idea here - I am always willing to consider new ideas
4. INTERESTING TECH NOTES
(A) You MUST use different DMA channels for recording and playback. This is
obvious, but I felt I should state the obvious. I have the recording DMA on
a lower (16-bit) DMA channel (higher priority) than the playback (16-bit)
DMA, but I haven't played around with it to see if that really matters.
(B) Do NOT use EMM386.EXE. I had this in my configuration and everything
worked fine (SBOS, Mega-Em, AIL, native demos, etc.), but when I use EMM386
with my program, the sound is horrendous. I think it is missing samples
because the DMA requests are being virtualized (i.e. slowed down). Since I
don't have 386Max or QEMM, I couldn't try those.
(C) I tried using two different schemes to get the continuous
recording/playback to work. Both involved double-buffering. Theoretically,
both should work, but after I got one to work, I did not try to get the
other one to work (because no one has answered my question about auto-init
DMA :-( ). Scheme 1 (which I did get to work) uses the Record Handler (no
auto-init) at the end of each buffer to control the downloading of data to
the GUS and ping-ponging of the buffers. Scheme 2 (which I did not get to
work) uses a Timer Handler to download the first half of the buffer
(buffer A) and the Record Handler (with auto-init) to download the second
half of the buffer (buffer B). On my 25MHz 386DX, I am able to use a
sample rate of 11025 Hz without losing any samples (that I can detect).
The only other rates I have tried are 22050 Hz and 44100 Hz, but I lose
samples at both of those rates.
(D) The playback rate and record rate are not always identical even if you
ask for them to be identical. This one really threw me for a while. If I
set it up for a noticeable delay time (1 sec), it would start out fine, but
then the voice would creep up (IOW, the delay would shrink) and pass the
point where I was writing new data into the GUS' memory. I solved this by
putting an UltraSetVoice call in the Record Handler to "correct" the
position of the voice on every Record Handler call. I know this "voice
creep" happens at 11025 Hz which is one of the 256 discrete frequencies at
which the GUS can sample.
(E1) This one bothers me because it seems to be a hardware limitation of the
analog portion of the GUS itself. In "Advanced Gravis Tech Note #20" which
John Smith submitted to "Ultrasound Daily Digest V5 #18", it says...
>There is NO way to disable the Mic/Line in from being passed to the
>line out. Hence, you can record and playback at the same time but keep
>in mine [sic] what you are trying to record and what you are trying to
>play through the UltraSound will be mixed by the time it is outputed [sic].
This is true, however, my experiences with my program indicate that the
output is also mixed in with the input!!! My program is set up to play the
delayed data once and only once, but the volume of the voice that is playing
the delayed data affects how many times the data is "echoed". If you set
the volume too high, you end up with a positive feedback situation where the
data gets repeated at louder and louder levels until it breaks up into
oblivion. This has (at least) two bad ramifications. The first is that the
idea mentioned in "Advanced Gravis Tech Note #20" (i.e. writing "a recording
studio program which would record to disk and while it is recording have the
UltraSound verbally tell the user how much disk space they have left.")
would work, but the time remaining announcement would be recorded along with
the real data that you want to record. The second is that if you want to
use several different delays of the same data to create a unique reverb
effect, you are going to get multiples of each delay summed in as well which
is probably not desirable. Speaking of this technique, it's too bad that
you can't have "negative" volume that would play an inverse of the data.
(E2) Thanks to Tom Klok for an excellent idea. Here is a quote from him:
>Ok, this problem seems insurmountable -- for stereo! But what if we try it
>in mono instead?
>
>Hook your source up to the left channel of the GUS's input. The right
>channel should be supplied silence. As clean a silence as you can manage,
>since any noise here will be mixed into the output.
>
>Now start recording in mono. The GUS will sample only the left channel, but
>feed the raw input from both channels to the outputs. You'll hear clean on
>the left, silence on the right.
>
>Now do your processing (ie block copy to GUS DRAM) and start playback, but
>play in mono mode with the voice's pan position hard over to the right
>channel. You end up with just the unprocessed source on the left, and just
>the processed on the right. Listen to the channel you like (probably right).
Enjoy!
Dave